package com.practice.java8中双冒号方法引用如何使用;
/**
 * @program: tenghw-practice-demo
 * @author: tenghw
 * @create: 2024-01-06 16:12
 * @Version 1.0
 * @description: 测试 类名::new
 **/
public class Demo4 {
    @FunctionalInterface
    protected interface IStudent<S,I,T>{
          T getInfo(S name, I age);
    }
    public static void main(String[] args) {
        // 构建一个函数式接口实例
        IStudent<String,Integer,Student> iStudent =Student::new;
        Student studentInfo = iStudent.getInfo("周明", 18);
        System.out.println("学生信息为："+studentInfo);
    }
}